package com.cym.service.impl;

import com.cym.dto.ProductParam;
import com.cym.entity.Product;
import com.cym.mapper.ProductMapper;
import com.cym.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    ProductMapper productMapper;

    @Override
    public List<Product> getProductList(ProductParam productParam) {
        return productMapper.getProductList(productParam);
    }

    @Override
    public String add(Product product) {
        return productMapper.add(product);
    }

    @Override
    public String update(Product product) {
        return productMapper.update(product);
    }

    @Override
    public String delete(Integer productId) {
        return productMapper.delete(productId);
    }
}
